<%@page import="com.mmy.domain.scenic.TScenicOrder"%>
<%@page import="com.mmy.domain.scenic.VScenicOrder"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="/WEB-INF/jsp/includeb.jsp"></jsp:include>

<script>
$(function () {
laydate.render({
  elem: '#searchOrderDate',
   type: 'date' ,
  theme: '#1eab3c',
  value: '${strOrderDate}'
	});
});
</script>
<title>景区信息</title>
</head>
<body>


	<div id="off-canvas-container" class="off-canvas-container">
		<jsp:include page="/WEB-INF/jsp/BackHeader.jsp"></jsp:include>
		<div id="menu-back">
			<main class="at-padding-large-bottom">
			<article>		
	<header class="bg-light at-padding-large-top at-padding-large-bottom at-margin-large-bottom">
		<div class="page-header container">
			<h2>景区订单信息</h2>			
		</div>
	</header>
			<section class="container">
					<nav class="breadcrumb" >
					<a href="toscenicallorderindex" >全部</a> |
				<a href="toscenicunusedorderindex" >未入园</a> |
					<a href="toscenicrecentlyuseorderindex" >近期待用</a> |
						<a href="toscenicusedorderindex" >已入园</a> 
				<hr class="breadcrumb-hr" color=#F9F6E5 SIZE=3>
				
					</nav>
					
					<div class="information" >
						
						<h4 class="info-h4">
							<i class="fa fa-caret-right" aria-hidden="true" ></i>
							<label>订单信息</label>
						</h4>
						<div class="input-container">
								<div class="select-condition">
							<form action="toscenicallorderindex" class="info-form" >
							<span> <label for="searchScenicName">景区名称：</label></span>
							<input id="searchScenicName" type="text" class="input-width" name="strScenicName" maxlength="16" value="${strScenicName}"/>
							<span> <label for="searchOrderName">订单联系人：</label></span>
							<input id="searchOrderName" type="text" class="input-width" name="strOrderName" maxlength="16" value="${strOrderName}"/>
							<span> <label for="searchOrderTel">订单联系电话：</label></span>
							<input id="searchOrderTel" type="text" class="input-width" name="strOrderTel" maxlength="16" value="${strOrderTel}"/>
							<span> <label for="searchOrderDate">订单日期：</label></span>
							<input type="text" id="searchOrderDate" name="strOrderDate" class="input-width2" />
							<span> <label for="searchOrderState">订单状态：</label></span>
							<select class="select-height" name="strOrderState" id="searchOrderState" >
								<option value="" <c:if test="${strOrderState eq('')}"> selected="selected"</c:if>>不限</option>
								<option value="2" <c:if test="${strOrderState eq('2')}"> selected="selected"</c:if>>订单</option>
				 				<option value="4" <c:if test="${strOrderState eq('4')}"> selected="selected"</c:if>>退单</option>
								</select> 	
								
									<input type="submit" value="搜索" class="btn"/>
								<input type="button" value="重置" class="btn" onclick="hhh()"/>
							</form>
						</div>
						<table class="info-table">
							<tr >
								<th width="30%"><label>景区名称</label></th>
								<th><label>景区所属公司</label></th>
							
								<th><label>订单人姓名</label></th>
								 <th><label>联系方式</label></th>
								<th><label>订单日期</label></th>
								<th><label>入园日期</label></th>
								<th><label>订单状态</label></th>
								<th><label>入园状态</label></th>
								<th><label>退单状态</label></th>
							</tr>
							<!-- 循环显示每个用户的信息 用jstl-->
      					  <c:forEach items="${lstScenicOrder}" var="lstScenicOrder" varStatus="status">
           				 	<tr >
           				 	
           				 	
           				 	<td><a href = "scenicbaseinfo?iScenicID=${lstScenicOrder.getScenicID()}"><label>${lstScenicOrder.getScenicName()}</label></a></td>
						
            			   	  <td ><label>${lstScenicOrder.getScenicOrgName()}</label></td>
            			   	 <td >
            			   	 <a href = "scenicorderinfo?iID=${lstScenicOrder.getID()}">
            			   	 <label>${lstScenicOrder.getOrderName()}</label></a>
            			   	 </td>
				              <td ><label>${lstScenicOrder.getOrderTel()}</label></td>
				                 
						<td>
						<fmt:formatDate value='${lstScenicOrder.getOrderDate()}' pattern='yyyy-MM-dd'/>
						</td>
						<td>
						<fmt:formatDate value='${lstScenicOrder.getUseDate()}' pattern='yyyy-MM-dd'/>
						</td>
						<td ><c:if test="${lstScenicOrder.getOrderState() eq('0') }"><label>预留</label></c:if>
						<c:if test="${lstScenicOrder.getOrderState() eq('1') }"><label>正式订单</label></c:if>
						<c:if test="${lstScenicOrder.getOrderState() eq('2') }"><label>已交款</label></c:if>
						<c:if test="${lstScenicOrder.getOrderState() eq('3') }"><label>取消预留</label></c:if>
						<c:if test="${lstScenicOrder.getOrderState() eq('4') }"><label>取消订单</label></c:if>
						</td>
						<td ><c:if test="${lstScenicOrder.getSpare2() eq('0') || lstScenicOrder.getSpare2() ==null}"><label>待使用</label></c:if>
						<c:if test="${lstScenicOrder.getSpare2() eq('1') }"><label>已使用</label></c:if>
						<c:if test="${lstScenicOrder.getSpare2() eq('2') }"><label>禁止使用</label></c:if>
						<c:if test="${lstScenicOrder.getSpare2() eq('3') }"><label>已过期</label></c:if>
						</td>
						<td ><c:if test="${lstScenicOrder.getRefundProcess() ==0 }"><label></label></c:if>
						<c:if test="${lstScenicOrder.getRefundProcess() ==1 }"><label>发起申请</label></c:if>
						<c:if test="${lstScenicOrder.getRefundProcess() ==2 }"><label>已退款</label></c:if>
						<c:if test="${lstScenicOrder.getRefundProcess() ==3 }"><label>不允许退款</label></c:if>
						</td>
						</tr>
						</c:forEach>
						</table>

						<select class="input-select-vlign" name="pageSize" onchange="scenicOrderPageSize(this.options[this.options.selectedIndex].value)">
							<option style="display: none;">${iPageSize}</option>
							<option value="20">20</option>
							<option value="50">50</option>
							<option value="100">100</option>
							<option value="200">200</option>
						</select> 
						<a href="toscenicallorderindex?pageNumber=1&pageSize=${iPageSize}&strScenicName=${strScenicName}&strOrderName=${strOrderName}&strOrderTel=${strOrderTel}&strOrderDate=${strOrderDate}&iOrderState=${strOrderState}">首页</a>
						
						<c:choose>
							<c:when test="${iPageNo == 1}">
						
							</c:when>
							<c:otherwise>
								<a href="toscenicallorderindex?pageNumber=${iPageNo-1}&pageSize=${iPageSize}&strScenicName=${strScenicName}&strOrderName=${strOrderName}&strOrderTel=${strOrderTel}&strOrderDate=${strOrderDate}&iOrderState=${strOrderState}">上一页</a>
							</c:otherwise>
						
						</c:choose>
						<c:choose>
							<c:when test="${iPageNo == iMaxPage}">
						
							</c:when>
							<c:otherwise>
								<a href="toscenicallorderindex?pageNumber=${iPageNo+1}&pageSize=${iPageSize}&strScenicName=${strScenicName}&strOrderName=${strOrderName}&strOrderTel=${strOrderTel}&strOrderDate=${strOrderDate}&iOrderState=${strOrderState}">下一页</a>
							</c:otherwise>
						
						</c:choose>
							<a href="toscenicallorderindex?pageNumber=${iMaxPage}&pageSize=${iPageSize}&strScenicName=${strScenicName}&strOrderName=${strOrderName}&strOrderTel=${strOrderTel}&strOrderDate=${strOrderDate}&iOrderState=${strOrderState}">尾页</a>
						
						</div>	
					
					</div>
				

				</section>
			</article>
			</main>
			</div>
		<jsp:include page="/WEB-INF/jsp/Footer.jsp"></jsp:include>
		</div>
		
		<!-- Main Slider -->
<jsp:include page="/WEB-INF/jsp/include2.jsp"></jsp:include>

</body>

</html>